<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9"/>
<title>NGUI: UIAnchor Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">NGUI
   &#160;<span id="projectnumber">3.11.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Packages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_u_i_anchor.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="class_u_i_anchor-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">UIAnchor Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>This script can be used to anchor an object to the side or corner of the screen, panel, or a widget.  
 <a href="class_u_i_anchor.html#details">More...</a></p>
<div class="dynheader">
Inheritance diagram for UIAnchor:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_u_i_anchor.png" usemap="#UIAnchor_map" alt=""/>
  <map id="UIAnchor_map" name="UIAnchor_map">
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:af85cc62570230b68200fe10660e2eedf"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af85cc62570230b68200fe10660e2eedf"></a>enum &#160;</td><td class="memItemRight" valign="bottom"><b>Side</b> { <br />
&#160;&#160;<b>BottomLeft</b>, 
<b>Left</b>, 
<b>TopLeft</b>, 
<b>Top</b>, 
<br />
&#160;&#160;<b>TopRight</b>, 
<b>Right</b>, 
<b>BottomRight</b>, 
<b>Bottom</b>, 
<br />
&#160;&#160;<b>Center</b>
<br />
 }</td></tr>
<tr class="separator:af85cc62570230b68200fe10660e2eedf"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:afe734d956d4091b0b533676cdc564eb3"><td class="memItemLeft" align="right" valign="top">Camera&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_anchor.html#afe734d956d4091b0b533676cdc564eb3">uiCamera</a> = null</td></tr>
<tr class="memdesc:afe734d956d4091b0b533676cdc564eb3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Camera used to determine the anchor bounds. Set automatically if none was specified.  <a href="#afe734d956d4091b0b533676cdc564eb3">More...</a><br /></td></tr>
<tr class="separator:afe734d956d4091b0b533676cdc564eb3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a366951c3c0f8cf2ce2519affa6dfc7e6"><td class="memItemLeft" align="right" valign="top">GameObject&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_anchor.html#a366951c3c0f8cf2ce2519affa6dfc7e6">container</a> = null</td></tr>
<tr class="memdesc:a366951c3c0f8cf2ce2519affa6dfc7e6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Object used to determine the container's bounds. Overwrites the camera-based anchoring if the value was specified.  <a href="#a366951c3c0f8cf2ce2519affa6dfc7e6">More...</a><br /></td></tr>
<tr class="separator:a366951c3c0f8cf2ce2519affa6dfc7e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a52990e8812e67a1f63c7de39900830a5"><td class="memItemLeft" align="right" valign="top">Side&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_anchor.html#a52990e8812e67a1f63c7de39900830a5">side</a> = Side.Center</td></tr>
<tr class="memdesc:a52990e8812e67a1f63c7de39900830a5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Side or corner to anchor to.  <a href="#a52990e8812e67a1f63c7de39900830a5">More...</a><br /></td></tr>
<tr class="separator:a52990e8812e67a1f63c7de39900830a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4fbc6a861519c064e82b981fa881f63e"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_anchor.html#a4fbc6a861519c064e82b981fa881f63e">runOnlyOnce</a> = true</td></tr>
<tr class="memdesc:a4fbc6a861519c064e82b981fa881f63e"><td class="mdescLeft">&#160;</td><td class="mdescRight">If set to 'true', <a class="el" href="class_u_i_anchor.html" title="This script can be used to anchor an object to the side or corner of the screen, panel, or a widget. ">UIAnchor</a> will execute once, then will be disabled. Screen size changes will still cause the anchor to update itself, even if it's disabled.  <a href="#a4fbc6a861519c064e82b981fa881f63e">More...</a><br /></td></tr>
<tr class="separator:a4fbc6a861519c064e82b981fa881f63e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a24cd8ce0e39ce50b9ff064a08ca9bcc0"><td class="memItemLeft" align="right" valign="top">Vector2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_anchor.html#a24cd8ce0e39ce50b9ff064a08ca9bcc0">relativeOffset</a> = Vector2.zero</td></tr>
<tr class="memdesc:a24cd8ce0e39ce50b9ff064a08ca9bcc0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Relative offset value, if any. For example "0.25" with 'side' set to Left, means 25% from the left side.  <a href="#a24cd8ce0e39ce50b9ff064a08ca9bcc0">More...</a><br /></td></tr>
<tr class="separator:a24cd8ce0e39ce50b9ff064a08ca9bcc0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab7b3674d7cebb0649051190612917027"><td class="memItemLeft" align="right" valign="top">Vector2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_anchor.html#ab7b3674d7cebb0649051190612917027">pixelOffset</a> = Vector2.zero</td></tr>
<tr class="memdesc:ab7b3674d7cebb0649051190612917027"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pixel offset value if any. For example "10" in x will move the widget 10 pixels to the right while "-10" in x is 10 pixels to the left based on the pixel values set in <a class="el" href="class_u_i_root.html" title="This is a script used to keep the game object scaled to 2/(Screen.height). If you use it...">UIRoot</a>.  <a href="#ab7b3674d7cebb0649051190612917027">More...</a><br /></td></tr>
<tr class="separator:ab7b3674d7cebb0649051190612917027"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>This script can be used to anchor an object to the side or corner of the screen, panel, or a widget. </p>
</div><h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="a366951c3c0f8cf2ce2519affa6dfc7e6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">GameObject UIAnchor.container = null</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Object used to determine the container's bounds. Overwrites the camera-based anchoring if the value was specified. </p>

</div>
</div>
<a class="anchor" id="ab7b3674d7cebb0649051190612917027"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Vector2 UIAnchor.pixelOffset = Vector2.zero</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pixel offset value if any. For example "10" in x will move the widget 10 pixels to the right while "-10" in x is 10 pixels to the left based on the pixel values set in <a class="el" href="class_u_i_root.html" title="This is a script used to keep the game object scaled to 2/(Screen.height). If you use it...">UIRoot</a>. </p>

</div>
</div>
<a class="anchor" id="a24cd8ce0e39ce50b9ff064a08ca9bcc0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Vector2 UIAnchor.relativeOffset = Vector2.zero</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Relative offset value, if any. For example "0.25" with 'side' set to Left, means 25% from the left side. </p>

</div>
</div>
<a class="anchor" id="a4fbc6a861519c064e82b981fa881f63e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool UIAnchor.runOnlyOnce = true</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>If set to 'true', <a class="el" href="class_u_i_anchor.html" title="This script can be used to anchor an object to the side or corner of the screen, panel, or a widget. ">UIAnchor</a> will execute once, then will be disabled. Screen size changes will still cause the anchor to update itself, even if it's disabled. </p>

</div>
</div>
<a class="anchor" id="a52990e8812e67a1f63c7de39900830a5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Side UIAnchor.side = Side.Center</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Side or corner to anchor to. </p>

</div>
</div>
<a class="anchor" id="afe734d956d4091b0b533676cdc564eb3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Camera UIAnchor.uiCamera = null</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Camera used to determine the anchor bounds. Set automatically if none was specified. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>D:/WorkDir/Unity3D_Work/taidou_arpg/Assets/NGUI/Scripts/UI/UIAnchor.cs</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="class_u_i_anchor.html">UIAnchor</a></li>
    <li class="footer">Generated on Sat Jan 4 2020 22:30:28 for NGUI by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.9 </li>
  </ul>
</div>
</body>
</html>
